import request from '@/utils/request'

// 登录
export function login(data) {
  // data: { username, password }
  return request.post('/auth/login', data, {
    headers: { 'Content-Type': 'application/x-www-form-urlencoded' }
  })
}

// 注册
export function register(data) {
  // data: { username, password }
  return request.post('/auth/register', data)
}